<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>表白</title>	
	<style type="text/css">
	@font-face {
		font-family: digit;
		src: url('digital-7_mono.ttf') format("truetype");
	}
	</style>

	<link href="css/default.css" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/garden.js"></script>
	<script type="text/javascript" src="js/functions.js"></script>
	
	<!-- Favicons -->
	<link href="爱心.png" rel="icon">
	

</head>

<body>
<!--背景图片-->
<img id="bg" src="bgi.png"/>
<!--背景音乐-->
<audio autoplay="autopaly">
  <source src="bgm.mp3" type="audio/mp3" />
</audio>
<!--设置显示文本-->
<div id="mainDiv">
	<div id="content">
		<div id="code">			
			<span class="comments">我想对你说：</span><br />
			<span class="comments">我能抽象出整个世界</span><br />
			<span class="comments">但是</span><br />
			<span class="comments">我却不能抽象出你</span><br />
			<span class="comments">因为你在我的心中是那么的具体 </span><br />
			我可以重载甚至覆盖<br />
			<span class="comments">这个世界里任何一种方法</span><br />
			但是<br />
			<span class="comments">我却不能重载我对你的爱意</span><br />
			你是我世界里私有的静态属性<br />
			<span class="comments">只有我拥有调用你的权力</span><br />
			我不小心调用了<br />
			<span class="comments">爱上了你这个方法</span><br />
			<span class="comments">我把自己作为参数传递进去</span><br />
			才发现爱你是一个无限的循环<br />
			<span class="keyword">我</span>找不到<span class="keyword">终止的轨迹</span><br />
			<span class="keyword">它</span>不停地返回对你的思念<span class="keyword">压入我心里的堆栈</span><br />
			<span class="comments">直至我的内存爆满</span><br />
			<span class="comments">再也装不下别的程序</span><br />
			<br>
			<br>
			亲爱的<br />
			我永远爱你<br />
		</div>
		<div id="loveHeart">
			<canvas id="garden"></canvas>
			<div id="words">
				<div id="messages">
					宝贝，我喜欢你已经是......
					<div id="elapseClock"></div>
				</div>
				<div id="loveu">
					爱你直到永永远远。<br/>
					<div class="signature">- kiloGrand</div>
				</div>
			</div>
		</div>
	</div>
</div>

<!--设置起始时间，计算现在到起始时间的天数-->
<script type="text/javascript">
var offsetX = $("#loveHeart").width() / 2;
var offsetY = $("#loveHeart").height() / 2 - 55;
var together = new Date();
together.setFullYear(2018, 3, 1);
together.setHours(15);
together.setMinutes(0);
together.setSeconds(0);
together.setMilliseconds(0);

if (!document.createElement('canvas').getContext) {
	var msg = document.createElement("div");
	msg.id = "errorMsg";
	msg.innerHTML = "Your browser doesn't support HTML5!<br/>Recommend use Chrome 14+/IE 9+/Firefox 7+/Safari 4+"; 
	document.body.appendChild(msg);
	$("#code").css("display", "none")
	$("#copyright").css("position", "absolute");
	$("#copyright").css("bottom", "10px");
	document.execCommand("stop");
} else {
	setTimeout(function () {
		startHeartAnimation();
	}, 5000);

	timeElapse(together);
	setInterval(function () {
		timeElapse(together);
	}, 500);

	adjustCodePosition();
	$("#code").typewriter();
}
</script>
<div style="text-align:center;clear:both"></div>

</body>
</html>